Skip to content

fix(docker): bump @modelcontextprotocol/sdk to 1.31.0 (CVE-2026-104850) - #8

Merged
nordz0r merged 4 commits into
mainfrom
fix/mcp-sdk-cve-2026-104850
Oct 7, 2026
Merged

nordz0r merged 4 commits into
mainfrom
fix/mcp-sdk-cve-2026-104850

Conversation

@nordz0r

@nordz0r nordz0r commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

Context

Upstream lidge-jun/opencodex @ v2.79.0 still has "@modelcontextprotocol/sdk": "^1.30.0" and resolves to 1.30.0. First patched release is 1.31.0. Path in the failed scan: home/bun/app/node_modules/@modelcontextprotocol/sdk.

Same approach as the existing fast-uri in-range packaging bump.

Not touched

  • live dd / secrets
  • .trivyignore, Trivy severity thresholds
  • workflows
  • compose
  • global npm installs
  • no PR to lidge-jun/opencodex

Test plan

  • PR CI: Build & smoke (no publish) green
  • Trivy CRITICAL + fixable HIGH clean for the PR build
  • After merge: check-upstream publishes ghcr.io/nordz0r/opencodex:2.79.0 (+ Docker Hub)
  • Confirm runtime SDK version ≥ 1.31.0 (SBOM / layer), no secrets

Upstream opencodex still declares "^1.30.0" and resolves to 1.30.0,
which is vulnerable (GHSA-6qxp-vccf-f47h). Packaging-only bump within
the allowed range, same pattern as the existing fast-uri patch.

Unblocks publish of v2.79.0 (issue #5). Does not change Trivy thresholds,
.trivyignore, workflows, or compose.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Clean pass · a3567d5 looks sound on architecture, data flow and security


Architecture

Architecture diagram for nordz0r/opencodex-docker at a3567d5

Play the walkthrough


Data flow

Data flow diagram for nordz0r/opencodex-docker at a3567d5

Follow each request


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Open a diagram on the canvas, then press W or click play to walk through the change one step at a time

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • Push a commit and the drawing stays, with a note that it is out of date. Tick Redraw in the note to draw the new head
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Trivy on the PR build (after MCP SDK bump) still blocked on CRITICAL
proxy-addr 2.0.7. Packaging-only in-tree update to 2.0.8; same pattern
as fast-uri / @modelcontextprotocol/sdk patches.
@nordz0r

nordz0r commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

CI update: MCP SDK patch landed (1.30.0 → 1.31.0), but Trivy still failed on a second finding that appeared in the current DB:

Pushed a follow-up packaging pin bun update proxy-addr@2.0.8 (transitive; not a direct upstream dep). No changes to Trivy thresholds / ignore / workflows / compose.

@nordz0r nordz0r left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вердикт: нужны правки (не approve)

Токен nordz0r — своего PR approve нельзя; COMMENT. Не мержить (merge только по зову Андрея).

Diff Dockerfile — ок

  • Точечный RUN bun update @modelcontextprotocol/sdk@1.31.0 сразу после fast-uri.
  • Комментарий с CVE-2026-104850 / GHSA-6qxp-vccf-f47h есть.
  • 1.31.0 входит в апстримный ^1.30.0 (и v2.59.0, и v2.79.0).
  • --frozen-lockfile не ломает: корневой bun install --frozen-lockfile идёт до патчей; gui/ — отдельный bun install --frozen-lockfile, mcp sdk там нет.
  • В логе билда: @modelcontextprotocol/sdk 1.30.0 -> 1.31.0.

CI на HEAD 9c85dfb — красный

Run: https://github.com/nordz0r/opencodex-docker/actions/runs/37529535730

  • Build amd64 + smoke: ✅
  • Trivy (CRITICAL + fixable HIGH): ❌
  • SBOM: skipped (после Trivy)

Trivy: Total: 1 (HIGH: 0, CRITICAL: 1)

Library CVE Severity Installed Fixed
proxy-addr CVE-2026-90711 (GHSA-jqcg-44mw-7w3h) CRITICAL / fixed 2.0.7 2.0.8

Целевой CVE-2026-104850 закрыт: в summary @modelcontextprotocol/sdk → 0 vulns (раньше на check-upstream был HIGH на 1.30.0).

Версия sdk в слое подтверждена билдом (1.31.0); SPDX SBOM не сгенерирован из‑за падения Trivy.

Что нужно

Добавить такой же packaging bump (в range express/^2.0.7):

# Patch proxy-addr to >=2.0.8 (CVE-2026-90711 / GHSA-jqcg-44mw-7w3h).
RUN bun update proxy-addr@2.0.8

После зелёного Trivy — повторное ревью. Merge по-прежнему только Андрей.

Общий механизм оверрайдов

Позже. Для одного (и даже двух) in-range патчей рядом с fast-uri точечных bun update достаточно. Имеет смысл завести overrides-файл / ARG-list / script, когда оверрайдов станет регулярно ≥3 или CI начнёт «догонять» advisory каждым PR — сейчас уже маячит третий (proxy-addr), но это не повод раздувать этот PR.

Nits

  • PR CI валидирует pin 2.59.0 из pull-request.yml, а unblock check-upstream — про 2.79.0; оба с ^1.30.0, патч применим. Не блокер.
  • После фикса proxy-addr имеет смысл глянуть SBOM artifact на sdk >= 1.31.0.

@nordz0r nordz0r left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ревью @ 9c85dfb: код ок, но CI красный — не мержу.

Что проверил:

  • Фикс SDK работает: в PR-сборке bun update дал @modelcontextprotocol/sdk 1.30.0 -> 1.31.0, Trivy по node_modules/@modelcontextprotocol/sdk — 0 находок. GHSA-6qxp-vccf-f47h: уязвимо >=1.12.0 <1.31.0, первый патч 1.31.0 — совпадает.
  • Локально воспроизвёл на bun 1.4.0 для v2.79.0: install → bun update fast-uri → bun update @modelcontextprotocol/sdk@1.31.0 → sdk 1.31.0, остальное не съехало (proxy-addr остаётся 2.0.8). package.json переписывается на ^1.31.0 — в пределах апстримного ^1.30.0, smoke это пережил.

Почему красный: новая CRITICAL CVE-2026-90711 / GHSA-jqcg-44mw-7w3h в proxy-addr 2.0.7 (фикс 2.0.8, опубликована 2026-10-05). PR-workflow (pull-request.yml) собирает не 2.79.0, а закреплённую 2.59.0, а в её bun.lock proxy-addr@2.0.7. В v2.79.0 lock уже proxy-addr@2.0.8, так что к этому PR находка отношения не имеет, но HEAD всё равно красный.

Варианты:

  1. Добавить RUN bun update proxy-addr (^2.0.7 у express → 2.0.8, тот же паттерн, что fast-uri) — PR CI позеленеет, а для 2.79.0 это no-op.
  2. И/или поднять пин в pull-request.yml до 2.79.0 @ beba8b7e5e479f3d8b4d404e3e47cf4aaef4d936, чтобы PR-smoke проверял то, что реально уходит в паблиш (это за пределами «workflows не трогаю», решать владельцу).

Nit: @1.31.0 — жёсткая цель. Когда апстрим поднимется до ^1.32, эта строка может откатить SDK на 1.31.0. Надёжнее bun update @modelcontextprotocol/sdk без версии (сейчас даст 1.32.1 в пределах ^1.30.0) или убрать строку, когда апстрим сам перейдёт на ≥1.31.

@nordz0r

nordz0r commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Follow-up per review:

  1. bun update @modelcontextprotocol/sdk / bun update proxy-addr — without version pins (aligned with fast-uri).
  2. pull-request.yml upstream pin raised to 2.79.0 @ beba8b7e5e479f3d8b4d404e3e47cf4aaef4d936.

Waiting on green CI; no merge from this side.

NorD and others added 2 commits October 7, 2026 00:04
Align with fast-uri style: bun update @modelcontextprotocol/sdk and
bun update proxy-addr without version pins (CVE-2026-104850 /
CVE-2026-90711).
@nordz0r

nordz0r commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Correction to the previous note: the follow-up is now on the branch:

  1. Dockerfile: bun update @modelcontextprotocol/sdk and bun update proxy-addr (unpinned).
  2. pull-request.yml pin: 2.79.0 @ beba8b7e5e479f3d8b4d404e3e47cf4aaef4d936.

Re-running CI; still not merging from this side.

@nordz0r nordz0r left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR-ревьюер @ a3567d5: готов к merge (approve), сам не мержу — merge за Андреем.

Проверено:

  • Dockerfile: bun update @modelcontextprotocol/sdk → в логе билда 1.30.0 -> 1.32.1 (в рамках ^1.30.0 апстрима). bun update proxy-addr идёт после.
  • pull-request.yml: smoke против v2.79.0 @ beba8b7e5e479f3d8b4d404e3e47cf4aaef4d936. Это совпадает с git ls-remote тега апстрима.
  • CI на HEAD: pull-request run 37531265292 success (build, smoke ALL CHECKS PASSED, version label 2.79.0, Trivy CRITICAL + fixable HIGH чисто, SBOM). GitGuardian и PR Lens зелёные.
  • Trivy: @modelcontextprotocol/sdk 0 и proxy-addr 0 уязвимостей. На 9c85dfb (run 37529535730) блокировал CRITICAL CVE-2026-90711 в proxy-addr 2.0.7.

Не блокирует:

  1. RUN bun update proxy-addr в этом билде ничего не изменил (no changes). proxy-addr поднялся до исправленной версии при пересборке зависимостей SDK. Шаг безвреден, но комментарий над ним вводит в заблуждение. Можно оставить как страховку или поправить комментарий.
  2. Описание PR устарело: в нём «pin 1.31.0» и «workflows не трогали». Фактически версии без пина (собралось 1.32.1) и изменён pull-request.yml.
  3. Версии внутри диапазона не воспроизводятся от сборки к сборке (так же, как с fast-uri). Регрессию поймает Trivy gate.
  4. В истории 4 коммита, в том числе pin и сразу unpin. Лучше squash.

После merge: проверить, что check-upstream опубликовал ghcr.io/nordz0r/opencodex:2.79.0 и Docker Hub (issue #5).

@nordz0r nordz0r left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ревью @ a3567d5: approve по сути, CI зелёный. Не мержу — по указанию merge делает Андрей.

Что изменилось с 9c85dfb:

  • Dockerfile: bun update @modelcontextprotocol/sdk и bun update proxy-addr без жёсткой версии, после fast-uri. Прошлый nit про downgrade при фиксированном @1.31.0 снят.
  • pull-request.yml: PR-smoke переведён на upstream v2.79.0 @ beba8b7 (то же, что публикует check-upstream). Пин сверен с тегом v2.79.0.

Проверено:

  • CI на HEAD: Build & smoke (run 37531265292) — pass; GitGuardian, PR Lens — pass.
  • В билде @modelcontextprotocol/sdk 1.30.0 -> 1.32.1 (≥1.31.0, в пределах ^1.30.0).
  • Trivy по образу: 0 находок во всех target, включая debian 13.7 и node_modules/@modelcontextprotocol/sdk.
  • Smoke: /healthz, /readyz, 401 без кредов, non-root uid=1000 — PASS.
  • Локально на bun 1.4.2 для v2.79.0 повторил последовательность: sdk → 1.32.1, proxy-addr уже 2.0.8 (шаг no-op, в package.json не добавляется) — безопасная страховка.

Nits (не блокеры):

  • Описание PR устарело: пишет «pin @1.31.0» и «Not touched: workflows», а теперь sdk без пина и workflow меняется. Стоит обновить перед merge.
  • В истории 4 коммита с откатом пина — при merge лучше squash.

@nordz0r
nordz0r merged commit 262a7fe into main Oct 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant